package cn.dengta.webapp.user.service;

import java.math.BigDecimal;
import java.util.Date;
import javax.annotation.Nullable;

import cn.dengta.common.web.Client;
import cn.dengta.webapp.base.entity.ChannelAppType;
import cn.dengta.webapp.base.service.RemoteBaseService;
import cn.dengta.webapp.user.entity.Channel;

/**
 * 渠道 服务实现类
 */
public interface RemoteChannelService extends RemoteBaseService<Channel, Long> {

	Channel get(String packageName, Client client);

	Long autoInsert(@Nullable Long userId, String campaignName, String appId, String appAlias, ChannelAppType appType, Date now);

	void channelCostStat(Date date, Long channelId, BigDecimal amount, Integer regCount);

	Channel findByPack(ChannelAppType appType, String appId, String pack, Client client);
}
